Color::Color() {
	Color(255,255,255);
}

Color::Color(int r, int g, int b) {
	this->r = CLAMP(r/255.0);
	this->g = CLAMP(g/255.0);
	this->b = CLAMP(b/255.0);
}

Color::Color(double r,double g, double b) {
	this->r = CLAMP(r);
	this->g = CLAMP(g);
	this->b = CLAMP(b);
}

Color* Color::addition(Color *color) {
	Color *nc = new Color();
	nc->r = CLAMP(this->r + color->r);
	nc->g = CLAMP(this->g + color->g);
	nc->b = CLAMP(this->b + color->b);
	return nc;
}

Color* Color::scale(double s) {
	Color *nc = new Color();
	nc->r = CLAMP(s * this->r);
	nc->g = CLAMP(s * this->g);
	nc->b = CLAMP(s * this->b);
	return nc;
}

Color* Color::multiplication(Color *color) {
	Color *nc = new Color();
	nc->r = (this->r * color->r);
	nc->g = (this->g * color->g);
	nc->b = (this->b * color->b);
	return nc;
}

Color* Color::reflection(double s,Color *color) {
	Color *nc = new Color();
	nc->r = CLAMP(s * this->r * color->r);
	nc->g = CLAMP(s * this->g * color->g);
	nc->b = CLAMP(s * this->b * color->b);
	return nc;
}
